package org.corolla.cloth.service;

import java.text.DecimalFormat;
import java.util.Set;

import org.corolla.cloth.compute.ComputTranspotFees;
import org.corolla.cloth.compute.ComputePriceBySize;
import org.corolla.cloth.entity.Accessory;

public class ComputeService {
	private static DecimalFormat dcmFmt = new DecimalFormat("#.##");

	/**
	 * 获取价格bySize接口
	 * @param clothSizeKey
	 * @param accessorySet
	 * @param clothMount
	 * @return
	 */
	public double getUnitPriceBysize(String clothSizeKey,Set<Accessory> accessorySet,int clothMount,double liningPrice){
		// 获取单价
		double unitPriceBySize = ComputePriceBySize.getPriceBySize(clothSizeKey, 
																	accessorySet, clothMount,liningPrice);
		// 获取运费
//		double transportFees = ComputTranspotFees.getTransportFees(clothMount);
		// 获取总价
//		double totalPriceBySize= unitPriceBySize*clothMount;
//		totalPriceBySize = Double.valueOf(dcmFmt.format(totalPriceBySize));
		return unitPriceBySize;
	}

}
